<?php
/**
 *
 *@package 
 *@copyright Copyright (c) 2012-2014 Tuniu.com
 *@author huxiaomin 2012
 *@version 1.0
 */
  
class TThrow{

    static function assert($assert,$msg, $level='warning'){
        if ($assert){
	        switch ($level){
	        	case 'warning':
	        		//gprint_r($msg);
	        		break;
	        	case 'die':
					//print_r(debug_backtrace());	        		
	        		die($msg);
	        		break;
	        	default:
	        		throw  new Exception($msg);
	        		break;
	        }
        }
    }    
}